id: sessions title: Get Sessions meta: Overview of the sessions endpoint of the Infinite Flight Live API order: 2 #
Get Sessions #
Retrieve active sessions (servers) in Infinite Flight.
Resource #
GET https://api.infiniteflight.com/public/v2/sessions
Authorization #
Include your API key (<apikey>
) by either:
- Adding the
apikey
query parameter. For example,?apikey=<apikey>
. - Sending a bearer authorization header with your API key. For example,
Authorization: Bearer <apikey>
.
Response #
Sample Response #
{
"errorCode": 0,
"result": [
{
"maxUsers": 1000,
"id": "89573c7f-d398-4281-bcc0-3e9b7f6b8492",
"name": "Sample Server",
"userCount": 187,
"type": 0
}
]
}
LiveAPIResponse #
Response Type: application/json
Name | Type | Description |
---|---|---|
errorCode |
integer | Enum: "Ok = 0" , "UserNotFound = 1" , "MissingRequestParameters = 2" , "EndpointError = 3" , "NotAuthorized = 4" , "ServerNotFound = 5" , "FlightNotFound = 6" , "NoAtisAvailable = 7" |
result |
[SessionInfo] | Array of SessionInfo objects |
SessionInfo #
Name | Type | Description |
---|---|---|
id |
string | The unique identifier for the server. Use this to request flights and ATC data |
name |
string | Name of the server |
maxUsers |
integer | Maximum number of users the server can accept |
userCount |
integer | Connected users to the server |
type |
integer | Enum: "Unrestricted = 0" , "Restricted = 1" |